<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function $$(id){
				return document.getElementById(id)
			}
			window.onload=function(){
					var cnv=$$("canvas")
					var cxt=cnv.getContext("2d")
							
					var image=new Image()
					image.src="img/2.jpeg"
					image.onload=function(){
						
						cxt.shadowOffsetX=0
						cxt.shadowOffsetY=0
						cxt.shadowColor="lawngreen"
						cxt.shadowBlur=10

						cxt.moveTo(75,40)
						cxt.bezierCurveTo(75,37,80,25,50,25)
						cxt.bezierCurveTo(20,25,20,62.5,20,62.5)
						cxt.bezierCurveTo(20,80,40,102,75,120)
						cxt.bezierCurveTo(110,102,130,80,130,62.5)
						cxt.bezierCurveTo(130,62.5,130,25,100,25)
						cxt.bezierCurveTo(85,25,75,37,75,40)
						cxt.stroke()
						var pattern=cxt.createPattern(image,"no-repeat")
						cxt.fillStyle=pattern
						cxt.fill()
					}
				}
		</script>
	</head>
	<body>
	<canvas id="canvas"width="200"height="150"style="border: gray dashed 1px;"></canvas>
	</body>
</html>
